<template>
    <div>
        center
        <!-- tiechui -add center -->
    </div>
</template>
<script>
export default {
  // 局部路由守卫
  beforeRouteEnter (to, from, next) {
    // ...
    if (!localStorage.getItem('token')) {
      next('/login')
    } else {
      next()
    }
  },
  mounted () {
    // 立即检查是否又token，如果没有，重定向到login

    /* if(!localStorage.getItem("token")){
            this.$router.push('/login')
        } */

  }
}
</script>
